翻訳と辞書
Words near each other
・ Man on the Moon (opera)
・ Man on the Moon (song)
・ Man on the Moon (soundtrack)
・ Man on the Prowl (film)
・ Man on the Rocks
・ Man on the Run
・ Man on the Run (album)
・ Man on the Silver Mountain
・ Man on the Tracks
・ Man on the Train (2011 film)
・ Man on Wire
・ Man on Wire (album)
・ Man or Astro-man?
・ Man or Astro-man? in Orbit
・ Man or Astro-man? vs. Europa
Man or boy test
・ Man or Mouse
・ Man or Muppet
・ Man Overboard
・ Man overboard
・ Man Overboard (band)
・ Man Overboard (Blink-182 song)
・ Man Overboard (Bob Welch album)
・ Man Overboard (Buck 65 album)
・ Man Overboard (Burl Barer book)
・ Man Overboard (Do-Re-Mi song)
・ Man Overboard (film)
・ Man Overboard (Man Overboard album)
・ Man Overboard (Yes, Prime Minister)
・ Man overboard rescue turn


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Man or boy test : ウィキペディア英語版
Man or boy test
The man or boy test was proposed by computer scientist Donald Knuth as a means of evaluating implementations of the ALGOL 60 programming language. The aim of the test was to distinguish compilers that correctly implemented "recursion and non-local references" from those that did not.

==Knuth's example==

begin
real procedure A(k, x1, x2, x3, x4, x5);
value k; integer k;
begin
real procedure B;
begin k := k - 1;
B := A := A(k, B, x1, x2, x3, x4);
end;
if k <= 0 then A := x4 + x5 else B;
end;
outreal(A(10, 1, -1, -1, 1, 0));
end;
This creates a tree of ''B'' call frames that refer to each other and to the containing ''A'' call frames, each of which has its own copy of ''k'' that changes every time the associated ''B'' is called. Trying to work it through on paper is probably fruitless, but the correct answer is −67, despite the fact that in the original paper Knuth conjectured it to be −121.
The survey paper by Charles H. Lindsey mentioned in the references contains a table for different starting values.
Even modern machines quickly run out of stack space for larger values of k, which are tabulated below ().〔(See Performance and Memory on the Rosetta Code Man or Boy Page )〕

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Man or boy test」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.